package user.suganguser.dao;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Component;

import com.sugangadmin.domain.SugangAdminCommand;
import com.suganguser.domain.SugangUserCommand;

@Component
public class SugangUserDaoImpl extends SqlSessionDaoSupport implements SugangUserDao{


	@Override
	public List<SugangUserCommand> userSelectList(String hakbun) {
		List<SugangUserCommand> selectList = getSqlSession().selectList("userSelectList",hakbun);
		return selectList;
	}

	@Override
	public List<SugangAdminCommand> userGwamokList(String gwa_code) {
		List<SugangAdminCommand> gwamokList = getSqlSession().selectList("userGwamokList", gwa_code);
		return gwamokList;
	}

	@Override
	public void insert(SugangUserCommand sugangUser) {
		getSqlSession().insert("userInsertGwamok", sugangUser);
	}

	@Override
	public void delete(String user_seq) {
		getSqlSession().delete("userDeleteGwamok", user_seq);
	}

	@Override
	public SugangUserCommand getMember(SugangUserCommand sugangUser) {
		SugangUserCommand sugangUserCommand = getSqlSession().selectOne("getSugangUser", sugangUser);
		return sugangUserCommand;
	}

	@Override
	public int getTot(String hakbun) {
		int tot = getSqlSession().selectOne("sumHakjum",hakbun);
		return tot;
	}
	





}
